import Vue from 'vue'
import Router from 'vue-router'
import routes from './routes'

Vue.use(Router)
const router = new Router({
    routes
})
router.beforeEach((to, from, next) => {
    console.log(`[route:] ${decodeURI(from.path)} => ${decodeURI(to.path)}`)
    document.title = to.meta.title
    next()
})
export default router